#include <iostream>
using namespace std;
int main(){
    int a[15][15]={};
    int b;
    cin >> b;
    for(int i=0;i<b;i++){
        for(int j=0;j<b;j++){
            if (j>i){
                break;
            }
            if(j == 0 or j == i){
                a[i][j]=1;
                cout<<a[i][j]<<" ";
            }
            else{
                a[i][j]=a[i-1][j-1]+a[i-1][j];
                cout<<a[i][j]<<" ";
            }
        }
        cout<<endl;
    }
}
